/*
 * Copyright © 2024-2025 Wenze Wei
 *
 * This file is part of StadionOS.
 *
 * This Source Code Form is subject to the terms of the GNU General Public License, v. 2.0.
 * You can obtain a copy of the GPL at
 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 */

#ifndef LIBS_MATH_H
#define LIBS_MATH_H

#define DHUGE_VAL (1.0 / 0.0)
#define DHUGE_VALF (1.0f / 0.0f)
#define DHUGE_VALL (1.0L / 0.0L)
#define DINFINITY HUGE_VAL
#define DNAN (0.0 / 0.0)
#define DEPSILON 1e-10

#define DM_E  2.71828182845904523536
#define DM_PI 3.14159265358979323846
#define DM_LOG2E 1.44269504088896340736
#define DM_LOG10E 0.43429448190325182765
#define DM_LN2 0.69314718055994530942
#define DM_LN10 2.30258509299404568402
#define DM_PI_2 1.57079632679489661923
#define DM_PI_4 0.78539816339744830962
#define DM_1_PI 0.31830988618379067154
#define DM_2_PI 0.63661977236758134308
#define DM_2_SQRTPI 1.12837916709551257390
#define DM_SQRT2 1.41421356237309504880
#define DM_SQRT1_2 0.70710678118654752440

#define true  1
#define false 0

double Sabsolute(double x);
double Scos(double x);
double Sasin(double x);
double Satan(double x);
double Satan2(double y, double x);
double Sceil(double x);
double Scos(double x);
double Scosh(double x);
double Sexp(double x);
double Sfabs(double x);
double Sfloor(double x);
double Sfmod(double x, double y);
double Slog(double x);
double Slog10(double x);
double Smodf(double x, double *integer);
double Spow(double x, double y);
double Ssin(double x);
double Ssinh(double x);
double Ssqrt(double x);
double Stanh(double x);
double SAtan(double x);
double SAtan2(double y, double x);

#endif //LIBS_MATH_H
